Control method for document scanning device

ABSTRACT

A document scanning device reads an image on a document while scanning the image, and generates image data based on the image. The document scanning device selects and sets a scanning speed in accordance with a transfer mode used when the document scanning device transfers the image data to another apparatus. The document scanning device controls the amount of generated image data by using the set scanning speed to successively read the image, whereby optimal transfer processing in accordance with the transfer mode can be performed. By switching a transfer path in accordance with the type of the read data, i.e., binary data per pixel or multilevel data per pixel, efficient data transfer can be performed.

This is a division of U.S. patent application Ser. No. 09/433,741, filedNov. 4, 1999 now U.S. Pat. No. 6,958,832.

BACKGROUND OF THE INVENTION

1. Field of the Invention

The present invention relates to document scanning devices for readingan image on a document, and control methods therefor.

2. Description of the Related Art

A conventional method has been used in which document scanning devices,such as scanners, facsimile devices, and copying machines, having thefunction of reading an image on a document are connected to a personalcomputer or the like, and image data obtained by reading the image whilescanning the document are transferred to the personal computer.

The types of interface between the personal computer and the documentscanning devices include a bidirectional parallel interface based on theIEEE P1284, SCSI, and RS232C standards. Among these types of interfaces,the IEEE P1284 is the most common, and has various modes such ascompatible mode, nybble mode, extended capabilities port (ECP) mode,byte mode, and enhanced parallel port (EPP) mode, whose transfer speedsdiffer greatly. The transfer speed is determined by the transfer modeand typically operates at dozens to hundreds of Kb/s, although itdepends on the use of the personal computer. It is said that theuniversal serial bus (USB), whose transfer speed is at least 1 Mb/s,will be widely used instead of the IEEE P1284 in future.

In addition, according to the IEEE 1394 interface, data can betransferred at 100 Mbytes/s or greater.

In adaptation for various types of interface and various reading modes,the realization of the desired functions in accordance with the transferspeed and the matching of system performance with the transfer speed areimportant considerations. Accordingly, a system capable of flexiblyadapting to various transfer modes or various types of transferinterfaces, regardless of transfer speed, is in demand.

In the case where the operation of reading an image as multiple data perpixel, such as 8-bit data per pixel is realized, the amount of the datato be transferred is eight times that of reading an image as binary dataper pixel. Therefore, a data-transfer load on the system bus of thedocument scanning device limits the transfer speed of the interface,even when a high transfer speed is used.

Conversely, a low transfer speed causes transfer processing to require alarge buffer memory capacity since the low transfer speed prevents thetransfer processing from being matched with a speed at which image dataare generated.

SUMMARY OF THE INVENTION

Accordingly, it is an object of the present invention to provide adocument scanning device in which the above-described problems areeliminated, and a control method therefor.

It is another object of the present invention to provide a documentscanning device for performing reading processing in accordance with atransfer mode used when read data are transferred, and a control methodtherefor.

It is a further object of the present invention to provide a documentscanning device for optimizing memory capacity used when read data aretransferred.

To these ends, according to a first aspect of the present invention, theforegoing objects are achieved through provision of a document scanningdevice including a scanning unit for scanning an image on a document andgenerating image data based on the image, a transfer unit fortransferring the image data from the scanning unit, a selection unit forselecting a transfer mode for transferring the image data by thetransfer unit, and a control unit for controlling the scanning operationof the scanning unit in accordance with the transfer mode selected bythe selection unit.

According to a second aspect of the present invention, the foregoingobjects are achieved through provision of an image processing apparatusincluding an input unit for inputting image data, a transfer unit fortransferring the image data input by the input unit, a determinationunit for determining whether the image data input by the input unit arebinary data per pixel or multilevel data per pixel, and a control unitfor controlling a transfer path for the image by the transfer unit inaccordance with a determination result by the determination unit.

According to a third aspect of the present invention, the foregoingobjects are achieved through provision of a document scanning deviceincluding a scanner for scanning an image on a document and generatingimage data based on the image, a transmitter for transmitting the imagedata from the scanner, a selector for selecting a transmission speed fortransmitting the image data by the transmitter, and a controller forcontrolling the scanning operation of the scanner in accordance with thetransmission speed selected by the selector.

According to a fourth aspect of the present invention, the foregoingobjects are achieved through provision of an image processing apparatusincluding a scanner for scanning an image on a document and generatingimage data based on the image, a transmitter for transmitting the imagedata from the scanner, a detector for detecting whether the image dataobtained from the scanner are binary data per pixel or multilevel dataper pixel, and a controller for controlling a transfer path for theimage data by the transmitter in accordance with a detection result bythe detector.

According to a fifth aspect of the present invention, the foregoingobjects are achieved through provision of a control method for ascanner. The control method includes the steps of scanning an image on adocument and generating image data based on the image, transferring theimage data obtained in the scanning step, selecting a transfer mode fortransferring the image data in the transferring step, and controllingthe scanning operation in the scanning step in accordance with thetransfer mode selected in the selecting step.

According to a sixth aspect of the present invention, the foregoingobjects are achieved through provision of a control method for an imageprocessing apparatus. The control method includes the steps of inputtingimage data, transferring the image data input in the inputting step,determining whether the image data input in the inputting step arebinary data per pixel or multilevel data per pixel, and controlling atransfer path for the image data in the transferring step in accordancewith a determination result obtained in the determining step.

According to a seventh aspect of the present invention, the foregoingobjects are achieved through provision of a computer-readable programfor controlling a scanner, which is stored in a storage medium, in whichthe computer-readable program includes the steps of scanning an image ona document and generating image data based on the image, transferringthe image data obtained in the scanning step, selecting a transfer modefor transferring the image data in the transferring step, andcontrolling the scanning operation in the scanning step in accordancewith the transfer mode selected in the selecting step.

According to an eighth aspect of the present invention, the foregoingobjects are achieved through provision of a computer-readable programfor controlling a scanner, which is stored in a storage medium, in whichthe computer-readable program includes the steps of inputting imagedata, transferring the image data input in the inputting step,determining whether the image data input in the inputting step arebinary data per pixel or multilevel data per pixel, and controlling atransfer path for the image data in the transferring step in accordancewith a determination result obtained in the determining step.

The above-described objects and other objects of the present inventionbecome apparent from the following detailed description based of theaccompanying drawings.

BRIEF DESCRIPTION OF THE DRAWINGS

FIG. 1 is a block diagram showing an image processing system accordingto a first embodiment of the present invention, which includes afacsimile device and a personal computer;

FIG. 2 is a block diagram showing the reader of the facsimile device inthe image processing system shown in FIG. 1;

FIGS. 3A and 3B are timing charts showing reading speed control by thereader shown in FIG. 2;

FIG. 4 is a flowchart showing a control process in the first embodiment;

FIG. 5 is a flowchart showing a control process by the image processingsystem shown in FIG. 1;

FIG. 6 is a block diagram showing an image processing system accordingto a second embodiment of the present invention; and

FIG. 7 is a flowchart showing the operation of control in the imageprocessing system shown in FIG. 6.

DESCRIPTION OF THE PREFERRED EMBODIMENTS

With reference to the accompanying drawings, the present invention isdescribed below based on the following embodiments.

FIG. 1 shows an image processing system according to a first embodimentof the present invention, which includes a facsimile device and apersonal computer.

A controller 1-1 for controlling the entirety of the facsimile device.Controller 1-1 comprises a microcomputer circuit including amicrocomputer, a read only memory (ROM), a random access memory (RAM), aclock integrated circuit, a direct memory access controller, and atimer. The controller 1-1 controls the operations of the entirefacsimile device by performing microcomputer software control, andmanages various data, such as fingertip dialing information, and sendernames.

A console 1-2 having various keys, indicators, etc., receives inputs bythe keys from an operator and displays various type of information. Acommunication controller 1-3 includes a line interface and a telephonecircuit. The communication controller 1-3 sends and/or receives imagedata and communication-control data on line T, and performs control ofreceiving incoming calls and sending outgoing calls.

A reader 1-5 includes a charge-coupled device, an analog-to-digital(A/D) converting circuit, and an image processing circuit. The reader1-5 implements, on data obtained by scanning a document and opticallyreading an image on the document, image processes such as byphotoelectric conversion, A/D conversion, image correction, andbinarization. A recorder 1-4 consists of a printer, such as a laser beamprinter or an inkjet printer.

A multiplexer (MUX) 1-6 selectively uses a control bus 1-9 and thereader 1-5 to output data to a personal computer interface (PC I/F) 1-7.The control bus 1-9 includes lines for an address signal, a data signal,a write signal, and a read signal.

The PC I/F 1-7 is used to perform data transmission and reception with ageneral personal computer (PC) 1-8. An interface standard such as thebidirectional Centronics interface or the USB is employed in the PC I/F1-7.

FIG. 2 shows the details of the reader 1-5.

A timing controller 2-1 receives a line-synchronization signal and aclock signal 1 from the controller 1-1, and outputs a control signal toa contact image sensor (hereinafter referred to as a “CS”) 2-2, andoperation clock signals and synchronization signals to other functionalunits.

After performing photoelectric conversion on image data obtained byscanning a document, i.e., image data obtained by sequentiallyperforming optical reading of an image on the document along thedirection in which the document is moved by a reading motor 2-13, the CS2-2 outputs the converted image data. Whenever the line-synchronizationsignal is input, the CS 2-2 outputs one line of image data insynchronization with the clock signal 1. The image data read by the CS2-2 are converted from analog into digital form by an analog-to-digital(A/D) converter 2-3.

The gain of the digital data is adjusted by an automatic gain controller(AGC) 2-4, and shading correction of the adjusted data is executed by ashading corrector 2-5. For the shading correction, reference dataobtained by storing reference white in a random access memory (RAM) 2-8beforehand are read and used via a RAM interface circuit (hereinafterreferred to as a “RAM I/F”) 2-7.

In the case where 8-bit data per pixel are output, the data corrected byshading correction are output to the MUX 1-6 via a first interfacecircuit (indicated as “I/F 1” in FIG. 2) 2-4.

In the case where binary data per pixel are output, the following imageprocessing is executed.

An edge-enhancement circuit (hereinafter referred to as an “EE”) 2-9uses the RAM I/F 2-7 to store, in the RAM 2-8, the multilevel datacorrected by shading correction, and uses Laplace transform techniquesto perform edge enhancement based on data of three lines. A gammaconverter (indicated as “γ” in FIG. 2) 2-10 executes brightness-densityconversion on the data processed by edge enhancement.

A binarization circuit 2-11 binarizes the converted data by errordiffusion or simply using a predetermined slice level. In errordiffusion, binarization is executed while reading errors caused by thebinarization of adjacent pixels from the RAM 2-8 via the RAM I/F 2-7,and errors caused by binarization are stored in the RAM 2-8 through theRAM I/F 2-7.

The binarized image data are converted from serial into parallel form bya second interface circuit (indicated as “I/F 2” in FIG. 2) 2-12, andthe converted data are output to the control bus 1-9.

As described above, the image data read by the CS 2-2 are converted intomultilevel data or binary data, and the converted data are output.

The reading motor 2-13 is driven to rotate by a motor driver 2-14.Driving-timing control and phase control are executed by the motorcontroller 2-15. The controller 1-1 inputs a line-synchronization signaland a clock signal 2 to the motor controller 2-15, and the motorcontroller 2-15 drives the reading motor 2-13, using, for example, thetiming shown in FIGS. 3A and 3B.

FIGS. 3A and 3B show a case in which the reading motor 2-13 is driven byperforming phase control.

Each interval of the line-synchronization signal to be input, shown inFIG. 3A, is double that of the line-synchronization signal to be input,shown in FIG. 3B, and the frequency of the clock signal to be input,shown in FIG. 3A, is double that of the clock signal to be input, shownin FIG. 3B. By inputting each line-synchronization signal, one line isread. The reading speed corresponding to the line-synchronization signalshown in FIG. 3A is double that corresponding to theline-synchronization signal shown in FIG. 3B.

By changing the line-synchronization signal and the clock frequency, thereading speed can be changed.

FIG. 4 is a flowchart showing a case in which in the first embodiment,binary data are transferred from the reader 1-5 of the facsimile deviceto the PC 1-8. This flowchart shows a process that is controlled basedon data representing a program stored in the ROM of the controller 1-1by the microprocessor of the controller 1-1.

In step S1, the process starts in accordance with a reading instructionfrom the PC 1-8, and determines whether the transfer mode is set for ahigh speed when the reading instruction is received. In the case wherethe interface used is, for example, the bidirectional Centronicsinterface, the process determines that the transfer mode is set for ahigh speed when a transfer mode determined by a negotiation phase is theECP mode, and determines that the transfer mode is set for a low speedwhen the transfer mode determined by the negotiation phase is the nibblemode.

In steps S2A and S2B, the image reading speed for each mode is set. Thesetting may be performed by storing, in a table in the ROM of thecontroller 1-1, parameters for combinations of transfer modes andreading resolutions, such as line-synchronization signals, clockfrequencies, and motor-excitation patterns, and reading them when eachmode is executed. The parameters include those for transfer to therecorder 1-4 and those for transmission by the communication controller1-3. Based on the reading resolution designated by the PC 1-8, theparameters in accordance with the transfer mode determined in step S1are selected and set.

In step S3, the read parameters are used to initiate reading, and instep S4, the process initiates transfer of image data while temporarilystoring a minimum of the image data in the RAM 2-8. After that, in stepS5, the process determines whether the reading of the image data hasbeen completed. If the reading of the image data has been completed, instep S6, the process determines whether the transfer of the image hasbeen completed. On completion of transferring the image data, control ofthe reading of image data and transfer of the image data is terminated.

FIG. 5 is a flowchart showing a control process performed when in thefirst embodiment, multilevel data are transferred from the reader 1-5 ofthe facsimile device to the PC 1-8. This flowchart also shows a processthat is controlled based on data representing a program stored in theROM of the controller 1-1 by the microprocessor of the controller 1-1.

In step S11, the process starts in accordance with a reading instructionfrom the PC 1-8, and determines whether image data to be transferred aremultilevel data, based on the contents of the instruction from the PC1-8. If the process has determined that the image data to be transferredare binary data, the process shown in FIG. 4 is performed. If theprocess has determined that the image data to be transferred aremultilevel data, in step S12, the process sets a transfer path for theimage data, which is adapted for a multilevel-data mode. In other words,the output of the first interface circuit IF/1 2-6 is selected. In stepS13, the process initiates the scanning of a document, and the readingof an image while temporarily storing the image data in the RAM 2-8.

In the control reading multilevel data, reading parameters for themultilevel-data mode are read from the ROM of the controller 1-1, andthe reading speed is controlled. In step S14, when the multilevel-datamode proceeds to a data transfer phase for transferring the image datastored in the RAM 2-8, in step S15, the MUX 1-6 is switched to thereader 1-5, and transfer of multilevel data per pixel from the reader1-5 via the PC I/F 1-7 is initiated.

If the transfer of the multilevel data has been finished in step S16,the MUX 1-6 is switched to the control bus 1-9. This is because whenimage data are transferred in units of certain bytes, for example, inunits of 64 kilobytes, image data and control data are alternatelytransmitted and received, and in such a case, the MUX 1-6 must besuccessively switched.

In step S18, the process determines whether reading has been finished.In step S19, the process determines whether transfer of all themultilevel data has been finished. If the transfer has been finished,control of the reading and transfer of the multilevel data isterminated.

Referring to FIG. 6, the structure of an image processing systemaccording to a second embodiment of the present invention is shown.Blocks identical to those shown in FIG. 1 are denoted by identicalreference numerals, and descriptions thereof are omitted.

A MUX 1-6 switches between a reader 1-5 and a control bus 1-9, similarlyto the MUX shown in FIG. 1. A second PC I/F 6-11 is used to perform datatransmission and reception with a second PC 2-12, similarly to the PCI/F 1-7. An interface standard such as the bidirectional Centronics orthe USB is employed in the PC I/F 1-7.

The types the PC I/F 1-7 and the PC I/F 6-11 differ. For example, whenthe bidirectional Centronics interface is used as the PC I/F 1-7, theUSB is used as the PC I/F 6-11. The USB enables a transmission speed ofapproximately 1 Mb/s, which is 5 to 30 times greater than that of thebidirectional Centronics interface.

FIG. 7 is a flowchart showing a case in which image data are transferredto the PC 1-8 or the PC 6-12. A control process of changing the readingspeed for a type of interface used for connection is described belowbased on the flowchart.

In step S21, the process determines whether a type of interface to whicha PC is connected is the USB. If the type of interface is abidirectional Centronics interface, the process shown in FIG. 4 or 5 isperformed. If the type of interface is the USB, the process sets theimage reading speed to a high speed for the USB. At this time,parameters for high speed reading, corresponding to the USB, areselected from among the parameters stored in the ROM of the controller1-1.

In step S23, the process initiates the scanning of a document and thereading of an image on the document, and temporarily storing the imagedata in the RAM 2-8. In step S24, the process initiates transmission ofthe image data.

After that, in step S25, the process determines whether the reading hasbeen completed. In step S26, if the process has determined that transferof the image data has been completed, the process terminates the readingand transfer of the image data.

In the above-described embodiments, an apparatus such as a printer,other than the PC, may be used as a receiver to which read data aretransferred. Concerning the document scanning device, devices other thanthe facsimile device, e.g., a copying machine and a scanner having onlythe function of reading, may be used.

In the above-described embodiments, an image reading instruction isreceived via each PC I/F 1-7. However, it may be received from theconsole 1-2.

As described above, according to the above-described embodiments, in animage processing system in which a PC or the like and a documentscanning apparatus are connected by an interface, operations adapted forvarious types of interface and transfer speeds thereof, and variousreading modes are realized.

In other words, in the case where image data obtained by reading animage on a document are transferred to a terminal such as a PC, byproviding a plurality of document scanning speeds (image reading speeds)corresponding to types of transmission interface and transmission modes,and selectively using the speeds to perform reading, a reading speedappropriate for the transfer speed is realized.

In the case where image data obtained by reading an image on a documentare transferred to a terminal, such as a PC, by separating paths fortransferring multilevel data and binary data as image data, a load onthe system when the multilevel data are transferred can be reduced, anda maximum transfer speed is realized.

By using an optimal reading speed in accordance with a transfer mode toread an image, the amount of generated image data can be controlled tosave buffer memory capacity.

Although the case where read data are transferred to a PC has beendescribed, transfer of read data to the recorder 1-4 (copying) andtransmission of read data via the communication controller 1-3(facsimile transmission) can perform reading at a reading speed inaccordance with a reading resolution and a receiver to which read dataare transferred.

The present invention may be applied not only to a system including aplurality of apparatuses (e.g., a host computer, interface units, areader, a printer, etc.) but also to an apparatus (e.g., a copyingmachine or a facsimile device) having a single function.

The scope of the present invention includes a modification practiced byproviding software a program code to a computer (e.g., a centralprocessing unit (CPU) or microprocessor unit) in an apparatus or systemconnected to a plurality of devices so that the devices can operate inorder to realize the functions of the foregoing embodiments, and causingthe devices to operate in accordance with programs stored in thecomputer in the apparatus or system.

In this case, the software program code realize the functions of theforegoing embodiments. Accordingly, the program code, a provision unitfor providing the computer with the program code, and a storage mediumfor storing the program code constitute the present invention.

The types of the storage medium for storing the program code include,for example, a floppy disk, a hard disk, an optical disk, amagneto-optical disk, a compact-disk read-only memory, a magnetic tape,a nonvolatile memory, and a read-only memory.

The present invention includes not only a modification in which thefunctions of the foregoing embodiments are realized such that thecomputer executes the provided program code, but also anothermodification in which the functions of the foregoing embodiments arerealized by executing the program code in association with an operatingsystem for the computer or application software.

In addition, the present invention also includes an embodiment in whichthe provided program code is stored in a memory of a computer add-inboard or an add-in unit connected to the computer, and the functions ofthe foregoing embodiments are realized such that the CPU or the like ofthe add-in board or unit implements part or all of actual processes.

Although the present invention has been described based on the foregoingembodiments, which are preferable, the present invention is not limitedto the foregoing embodiments, but may be variously modified within thescope of the claims.

1. A document scanning device comprising: a scanner to scan a documentand to generate image data based on the scanned document; a determinerconfigured to determine a type of interface for transmission of thegenerated image data from among a plurality of interface types, theinterface being connected to a computer terminal; a setter configured toset a scanning speed of said scanner from among a plurality of scanningspeeds based upon the type of interface determined by said determiner; acontroller configured to control said scanner to scan the document atthe scanning speed set by said setter; and a transmitter configured totransmit the image data generated by said scanner to the computerterminal via the interface and further configured to transmit at one ofa plurality of transmission speeds, which corresponds to the type ofinterface determined by said determiner.
 2. The device according toclaim 1, further comprising a plurality of interface portions, each ofthe plurality of interface portions being capable of connecting saiddocument scanning device with said computer terminal, wherein saidtransmitter transmits the image data to said computer terminal via oneof the plurality of interface portions.
 3. A method of controlling adocument scanning device for scanning a document and generating imagedata, said method comprising: scanning a document and generating imagedata based on the scanned document; determining a type of interface fromamong a plurality of interface types to be used for transmission ofimage data, the interface being connected to a computer terminal;setting a scanning speed of the document scanning device from among aplurality of scanning speeds based upon the determined interface type;controlling the document scanning device to scan the document at the setscanning speed; and transmitting the image data generated by thedocument scanning device to the computer terminal via the interface atone of a plurality of transmission speeds, which corresponds to thedetermined interface type.